import request from '@/utils/request'


export const getDailyNewPatients = () => {
  return request({
    url: '/his/patient/dailyNewPatients',
    method: 'get'
  });
}
// 查询病患信息列表
export function listPatient(query) {
  return request({
    url: '/his/patient/list',
    method: 'get',
    params: query
  })
}
// 查询病患信息列表
export function listPatientAll() {
  return request({
    url: '/his/patient/listAll',
    method: 'get'
  })
}
// 查询病患信息详细
export function getPatient(id) {
  return request({
    url: '/his/patient/' + id,
    method: 'get'
  })
}

// 新增病患信息
export function addPatient(data) {
  return request({
    url: '/his/patient',
    method: 'post',
    data: data
  })
}

// 修改病患信息
export function updatePatient(data) {
  return request({
    url: '/his/patient',
    method: 'put',
    data: data
  })
}

// 删除病患信息
export function delPatient(id) {
  return request({
    url: '/his/patient/' + id,
    method: 'delete'
  })
}
